#include <arch.h>
#include <t8.h>
#include <libpub.h>

extern "C" void TouchInit();
extern "C" int TouchRead(TOUCH_DATA *pData);

int _Do_Test_Touch(char* param)
{
    int i, ret;
    TOUCH_DATA data;

    TouchInit();
    for (i = 0; i < 100; i++) {
        ret = TouchRead(&data);
        if (ret == 0) {
            printk("touch: x = %d, y = %d, dir = %d\n", data.x, data.y, data.dir);
        }
        else {
            printk("touch: Not touched now.\n");
        }

        ostdelay(1000 * 10);
    }
    return 0;
}
